-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make DatabaseTasks adapters use DatabaseConfig objects #37291
Merged
eileencodes
merged 1 commit into
rails:master
from
seejohnrun:use-database-config-objects-in-database-tasks
Sep 25, 2019
Merged
Make DatabaseTasks adapters use DatabaseConfig objects #37291
eileencodes
merged 1 commit into
rails:master
from
seejohnrun:use-database-config-objects-in-database-tasks
Sep 25, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seejohnrun
force-pushed
the
use-database-config-objects-in-database-tasks
branch
3 times, most recently
from
September 25, 2019 16:32
b7de700
to
9f49391
Compare
seejohnrun
added a commit
to seejohnrun/rails
that referenced
this pull request
Sep 25, 2019
We are seeing some test failures for this test in rails#37291. It looks like what's going on is that Puma has changed the output for this command between 4.1 and 4.2 Previously: ``` ... * Environment: development * Listening on tcp://localhost:3000 ... ``` Now: ``` ... * Environment: development * Listening on tcp://127.0.0.1:3000 * Listening on tcp://[::1]:3000 ... ``` So to get around this, instead of checking the binding address, just check for the presence of 'Listening' generally like we do on server start. Co-authored-by: eileencodes <eileencodes@gmail.com>
We are moving to using `DatabaseConfig` objects everywhere inside of Rails instead of passing around Hash objects. This PR moves to using `DatabaseConfig` objects inside of the individual database tasks adapters. In the interest of not breaking existing adapters, we've introduced an upgrade path by which adapters can get a hold of database configuration objects instead of Hashes by implementing a method `self.using_database_configurations?` Co-authored-by: eileencodes <eileencodes@gmail.com>
seejohnrun
force-pushed
the
use-database-config-objects-in-database-tasks
branch
from
September 25, 2019 17:52
9f49391
to
4ee9dab
Compare
carlosantoniodasilva
pushed a commit
that referenced
this pull request
Sep 25, 2019
We are seeing some test failures for this test in #37291. It looks like what's going on is that Puma has changed the output for this command between 4.1 and 4.2 Previously: ``` ... * Environment: development * Listening on tcp://localhost:3000 ... ``` Now: ``` ... * Environment: development * Listening on tcp://127.0.0.1:3000 * Listening on tcp://[::1]:3000 ... ``` So to get around this, instead of checking the binding address, just check for the presence of 'Listening' generally like we do on server start. Co-authored-by: eileencodes <eileencodes@gmail.com>
eileencodes
deleted the
use-database-config-objects-in-database-tasks
branch
September 25, 2019 22:33
tagliala
added a commit
to tagliala/activerecord-postgis-adapter
that referenced
this pull request
Dec 12, 2020
- ActiveRecord Autoload Change: rails/rails@b744372 - Use DatabaseConfig Instead of Hash for Tasks: rails/rails#37291 - Move ActiveRecord::Tasks::DatabaseAlreadyExists to ActiveRecord::DatabaseAlreadyExists: rails/rails@69700c9 Close: rgeo#322, rgeo#323
tagliala
added a commit
to tagliala/activerecord-postgis-adapter
that referenced
this pull request
Dec 12, 2020
- ActiveRecord Autoload Change: rails/rails@b744372 - Use DatabaseConfig Instead of Hash for Tasks: rails/rails#37291 - Move ActiveRecord::Tasks::DatabaseAlreadyExists to ActiveRecord::DatabaseAlreadyExists: rails/rails@69700c9 - Wrap native adapters connection errors: rails/rails#40110 Close: rgeo#322, rgeo#323
tagliala
added a commit
to tagliala/activerecord-postgis-adapter
that referenced
this pull request
Dec 12, 2020
- ActiveRecord Autoload Change: rails/rails@b744372 - Use DatabaseConfig Instead of Hash for Tasks: rails/rails#37291 - Move ActiveRecord::Tasks::DatabaseAlreadyExists to ActiveRecord::DatabaseAlreadyExists: rails/rails@69700c9 - Wrap native adapters connection errors: rails/rails#40110 Close: rgeo#322, rgeo#323
tagliala
added a commit
to tagliala/activerecord-postgis-adapter
that referenced
this pull request
Dec 12, 2020
- ActiveRecord Autoload Change: rails/rails@b744372 - Use DatabaseConfig Instead of Hash for Tasks: rails/rails#37291 - Move ActiveRecord::Tasks::DatabaseAlreadyExists to ActiveRecord::DatabaseAlreadyExists: rails/rails@69700c9 - Wrap native adapters connection errors: rails/rails#40110 Close: rgeo#322, rgeo#323
tagliala
added a commit
to tagliala/activerecord-postgis-adapter
that referenced
this pull request
Dec 12, 2020
- ActiveRecord Autoload Change: rails/rails@b744372 - Use DatabaseConfig Instead of Hash for Tasks: rails/rails#37291 - Move ActiveRecord::Tasks::DatabaseAlreadyExists to ActiveRecord::DatabaseAlreadyExists: rails/rails@69700c9 - Wrap native adapters connection errors: rails/rails#40110 Close: rgeo#322, rgeo#323
tagliala
added a commit
to tagliala/activerecord-postgis-adapter
that referenced
this pull request
Dec 12, 2020
- ActiveRecord Autoload Change: rails/rails@b744372 - Use DatabaseConfig Instead of Hash for Tasks: rails/rails#37291 - Move ActiveRecord::Tasks::DatabaseAlreadyExists to ActiveRecord::DatabaseAlreadyExists: rails/rails@69700c9 - Wrap native adapters connection errors: rails/rails#40110 Close: rgeo#322, rgeo#323
tagliala
added a commit
to tagliala/activerecord-postgis-adapter
that referenced
this pull request
Dec 12, 2020
- ActiveRecord Autoload Change: rails/rails@b744372 - Use DatabaseConfig Instead of Hash for Tasks: rails/rails#37291 - Move ActiveRecord::Tasks::DatabaseAlreadyExists to ActiveRecord::DatabaseAlreadyExists: rails/rails@69700c9 - Wrap native adapters connection errors: rails/rails#40110 Close: rgeo#322, rgeo#323
tagliala
added a commit
to tagliala/activerecord-postgis-adapter
that referenced
this pull request
Dec 12, 2020
- ActiveRecord Autoload Change: rails/rails@b744372 - Use DatabaseConfig Instead of Hash for Tasks: rails/rails#37291 - Move ActiveRecord::Tasks::DatabaseAlreadyExists to ActiveRecord::DatabaseAlreadyExists: rails/rails@69700c9 - Wrap native adapters connection errors: rails/rails#40110 Close: rgeo#322, rgeo#323
tagliala
added a commit
to tagliala/activerecord-postgis-adapter
that referenced
this pull request
Dec 14, 2020
- ActiveRecord Autoload Change: rails/rails@b744372 - Use DatabaseConfig Instead of Hash for Tasks: rails/rails#37291 - Move ActiveRecord::Tasks::DatabaseAlreadyExists to ActiveRecord::DatabaseAlreadyExists: rails/rails@69700c9 - Wrap native adapters connection errors: rails/rails#40110 Close: rgeo#322, rgeo#323
tagliala
added a commit
to tagliala/activerecord-postgis-adapter
that referenced
this pull request
Dec 15, 2020
- ActiveRecord Autoload Change: rails/rails@b744372 - Use DatabaseConfig Instead of Hash for Tasks: rails/rails#37291 - Move ActiveRecord::Tasks::DatabaseAlreadyExists to ActiveRecord::DatabaseAlreadyExists: rails/rails@69700c9 - Wrap native adapters connection errors: rails/rails#40110 Close: rgeo#322, rgeo#323
tagliala
added a commit
to tagliala/activerecord-postgis-adapter
that referenced
this pull request
Dec 17, 2020
- ActiveRecord Autoload Change: rails/rails@b744372 - Use DatabaseConfig Instead of Hash for Tasks: rails/rails#37291 - Move ActiveRecord::Tasks::DatabaseAlreadyExists to ActiveRecord::DatabaseAlreadyExists: rails/rails@69700c9 - Wrap native adapters connection errors: rails/rails#40110 Close: rgeo#322, rgeo#323
dazralsky
pushed a commit
to dazralsky/activerecord-postgis-adapter
that referenced
this pull request
Aug 21, 2023
- ActiveRecord Autoload Change: rails/rails@b744372 - Use DatabaseConfig Instead of Hash for Tasks: rails/rails#37291 - Move ActiveRecord::Tasks::DatabaseAlreadyExists to ActiveRecord::DatabaseAlreadyExists: rails/rails@69700c9 - Wrap native adapters connection errors: rails/rails#40110 Close: #322, #323
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are moving to using
DatabaseConfig
objects everywhere inside ofRails instead of passing around Hash objects.
This PR moves to using
DatabaseConfig
objects inside of the individualdatabase tasks adapters. In the interest of not breaking existing
adapters, we've introduced an upgrade path by which adapters can get a
hold of database configuration objects instead of Hashes by implementing
a method
self.using_database_configurations?
.cc / @eileencodes